import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import { NestExpressApplication } from '@nestjs/platform-express';
import { join } from 'path';
// import { JwtModule } from '@nestjs/jwt';


async function bootstrap() {
  const app = await NestFactory.create<NestExpressApplication>(AppModule);
  app.setGlobalPrefix('mi')
  // app.useStaticAssets('public', { prefix: '/img' })

  app.useStaticAssets(join(__dirname, '..', 'public'), {
    prefix: '/static/',
  });
  app.enableCors() // 开启跨域
  await app.listen(3000);
}
bootstrap();
